 package com.toidep.videoplayer.util;
 
 public class StringUtils
 
 {
	   static int s;
	   static int e ;
   public static String fixLastSlash(String str)
   {
/* 21 */     String res = str.trim() + "/";
/* 22 */     if ((res.length() > 2) && (res.charAt(res.length() - 2) == '/'))
/* 23 */       res = res.substring(0, res.length() - 1);
/* 24 */     return res;
   }
   		
   public static int convertToInt(String str) throws NumberFormatException
   {
/* 29 */     for ( s = 0; s < str.length(); s++)
/* 30 */       if (Character.isDigit(str.charAt(s)))
         break;
/* 32 */     for ( e = str.length(); e > 0; e--)
/* 33 */       if (Character.isDigit(str.charAt(e - 1)))
         break;
/* 35 */     if (e >  s) {
       try {
/* 37 */         return Integer.parseInt(str.substring(s, e));
       } catch (NumberFormatException ex) {
/* 39 */         Log.e("convertToInt", ex);
/* 40 */         throw new NumberFormatException();
       }
     }
/* 43 */     throw new NumberFormatException();
   }
 
   public static String generateTime(long time)
   {
/* 48 */     int totalSeconds = (int)(time / 1000L);
/* 49 */     int seconds = totalSeconds % 60;
/* 50 */     int minutes = totalSeconds / 60 % 60;
/* 51 */     int hours = totalSeconds / 3600;
 
/* 53 */     return hours > 0 ? String.format("%02d:%02d:%02d", new Object[] { Integer.valueOf(hours), Integer.valueOf(minutes), Integer.valueOf(seconds) }) : String.format("%02d:%02d", new Object[] { Integer.valueOf(minutes), Integer.valueOf(seconds) });
   }
 
   public static boolean isBlank(String s) {
/* 57 */     return (s == null) || (s.trim().equals(""));
   }
 }
